package com.qly.mybatis.mysql.web;

import com.qly.mybatis.mysql.entity.WdUser;
import com.qly.mybatis.mysql.service.IWdUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Andy ye on 2018/8/9.
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private IWdUserService userService;

    @RequestMapping(value = "/get_all")
    public List<WdUser> getAllUser(HttpServletRequest request,
                                   HttpServletResponse response) {
        List<WdUser> userAll = userService.findUserAll();
        return userAll;
    }
}
